jQuery enhances the basic
event-handling mechanisms by offering
the events methods for most native
browser events, some of these methods
are ready(), click(), keypress(), focus(), blur(), change(), etc. For example, to execute some
JavaScript code when the DOM is ready,
you can use the jQuery ready()
method, like this: